package com.lyh.service;

import com.lyh.pojo.User;
import com.lyh.service.user.UserServiceImpl;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

public class testUserServiceImpl {
    @Test
    public void test(){
        ApplicationContext Context = new ClassPathXmlApplicationContext("application.xml");
        UserServiceImpl userService = Context.getBean("userService", UserServiceImpl.class);

        List<User> userList = userService.getUserList();
        for (User user : userList) {
            System.out.println(user);
        }
    }
}
